package config
{
	import Common.GameResManager;
	
	public class EnemyConfig
	{
		public var object:Object = null;
		
		public function EnemyConfig()
		{
			
		}
		
		
		public static var instance:EnemyConfig = null;
		public static function Instance():EnemyConfig
		{
			if ( instance == null )
			{
				instance = new EnemyConfig();
			}
			
			return instance;
		}
		
		
		public function init():void
		{
			object = new Object();
			
			var xml:XML = XML( new GameResManager.instance.mainRes.enemyString() );
			
			for each ( var element:XML in xml.elements() )
			{
				var i:String = element.@i;
				
				object[ i ] = element;
			}
			
			xml = null;
		}
		
		
		public function getString( id:int ):Object
		{
			return object[ id ];
		}
		
	}
}